package cn.laixueit.controller;

import cn.laixueit.pojo.Message;
import cn.laixueit.service.MessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/msg")
public class MessageController {
    @Autowired
    private MessageService messageService;


    @GetMapping("/list")
    public List<Message> list(){
        return messageService.findMessageOrderLimit6();
    }
}
